package org.example.test;

public class test1 {
    @FunctionalInterface
    interface NoParameterNoRetuen{
        void test();
    }
    @FunctionalInterface
    interface MoreParameterNoReturn{
        void test(int a,int b);
    }
    @FunctionalInterface
    interface NoParameterReturn {
        int test();
    }
    //有返回值⼀个参数
    @FunctionalInterface
    interface OneParameterReturn {
        int test(int a);
    }
    //有返回值多参数
    @FunctionalInterface
    interface MoreParameterReturn {
        int test(int a,int b);
    }

    public static void main(String[] args) {
        NoParameterNoRetuen noParameterNoRetuen=()->{
            System.out.println("无参无返回值");
       };
        noParameterNoRetuen.test();
        NoParameterReturn noParameterReturn=()->{
            System.out.println("无参有返回值");
            return  100;
        };
        int a=noParameterReturn.test();
        System.out.println(a);
    }

}
